/*
 *************************************************************************
 *西瑞克斯研发管理系统
 *版 本: 1.0   
 *日 期：02/07/2012    
 *作 者： 王浩 QQ：873987060   
 *************************************************************************   
 */
package com.application.yfmaterieldepart.entity;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import com.manager.IBaseBean;
import com.manager.commons.DateUtil;

import java.util.Date;

/**
 * 
 * Description:YfMaterielDepart实体<br />
 * 
 * Version:V0.1<br />
 * 
 * Author: 王浩 QQ：873987060 <br />
 * 
 * History: <br />
 * 
 * 02/07/2012
 * 
 */
@Entity
@Table(name = "yf_materiel_depart")
public class YfMaterielDepart implements IBaseBean {

	/** serialVersionUID */
	protected static final long serialVersionUID = -1L;

	public YfMaterielDepart() {

	}

	@Id
	@Column(name = "id")
	private String id; // $field.label

	@Column(name = "project_no")
	private String projectNo; // $field.label

	@Column(name = "madename")
	private String madename; // $field.label

	@Column(name = "price")
	private Float price; // $field.label

	@Column(name = "count")
	private Long count; // $field.label

	@Column(name = "purchase")
	private Date purchase; // $field.label

	@Column(name = "vender")
	private String vender; // $field.label

	@Column(name = "provider")
	private String provider; // $field.label

	@Column(name = "linkman")
	private String linkman; // $field.label

	@Column(name = "linkphone")
	private String linkphone; // $field.label

	@Column(name = "type")
	private Long type; // $field.label

	@Column(name = "operateid")
	private String operateid; // $field.label

	@Column(name = "create_date")
	private Date createDate; // $field.label
	
	@Transient
	private String projectName;
	
	@Transient
	private String projectOrg;
	
	@Transient
	private String projectOrgName;
	
	@Transient
	private Long initiateYear;
	
	@Transient
	private String purchaseStr;

	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public String getProjectOrg() {
		return projectOrg;
	}

	public void setProjectOrg(String projectOrg) {
		this.projectOrg = projectOrg;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Id.
	 */
	public String getId() {
		return this.id;
	}

	/**
	 * @param id
	 *            Set the id.
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the ProjectNo.
	 */
	public String getProjectNo() {
		return this.projectNo;
	}

	/**
	 * @param projectNo
	 *            Set the projectNo.
	 */
	public void setProjectNo(String projectNo) {
		this.projectNo = projectNo;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Madename.
	 */
	public String getMadename() {
		return this.madename;
	}

	/**
	 * @param madename
	 *            Set the madename.
	 */
	public void setMadename(String madename) {
		this.madename = madename;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Price.
	 */
	public Float getPrice() {
		return this.price;
	}

	/**
	 * @param price
	 *            Set the price.
	 */
	public void setPrice(Float price) {
		this.price = price;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Count.
	 */
	public Long getCount() {
		return this.count;
	}

	/**
	 * @param count
	 *            Set the count.
	 */
	public void setCount(Long count) {
		this.count = count;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Purchase.
	 */
	public Date getPurchase() {
		return this.purchase;
	}

	/**
	 * @param purchase
	 *            Set the purchase.
	 */
	public void setPurchase(Date purchase) {
		this.purchase = purchase;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Vender.
	 */
	public String getVender() {
		return this.vender;
	}

	/**
	 * @param vender
	 *            Set the vender.
	 */
	public void setVender(String vender) {
		this.vender = vender;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Provider.
	 */
	public String getProvider() {
		return this.provider;
	}

	/**
	 * @param provider
	 *            Set the provider.
	 */
	public void setProvider(String provider) {
		this.provider = provider;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Linkman.
	 */
	public String getLinkman() {
		return this.linkman;
	}

	/**
	 * @param linkman
	 *            Set the linkman.
	 */
	public void setLinkman(String linkman) {
		this.linkman = linkman;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Linkphone.
	 */
	public String getLinkphone() {
		return this.linkphone;
	}

	/**
	 * @param linkphone
	 *            Set the linkphone.
	 */
	public void setLinkphone(String linkphone) {
		this.linkphone = linkphone;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Type.
	 */
	public Long getType() {
		return this.type;
	}

	/**
	 * @param type
	 *            Set the type.
	 */
	public void setType(Long type) {
		this.type = type;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Operateid.
	 */
	public String getOperateid() {
		return this.operateid;
	}

	/**
	 * @param operateid
	 *            Set the operateid.
	 */
	public void setOperateid(String operateid) {
		this.operateid = operateid;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the CreateDate.
	 */
	public Date getCreateDate() {
		return this.createDate;
	}

	/**
	 * @param createDate
	 *            Set the createDate.
	 */
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String toString() {
		return ReflectionToStringBuilder.toString(this,
				ToStringStyle.MULTI_LINE_STYLE);
	}

	public String getPurchaseStr() {
		if(purchase!=null){
			return DateUtil.dateToString(purchase,"yyyy-MM-dd");
		}
		return "";
	}

	public Long getInitiateYear() {
		return initiateYear;
	}

	public void setInitiateYear(Long initiateYear) {
		this.initiateYear = initiateYear;
	}

	public String getProjectOrgName() {
		return projectOrgName;
	}

	public void setProjectOrgName(String projectOrgName) {
		this.projectOrgName = projectOrgName;
	}

 
}
